package com.shun.gateway;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ApplicationContext;
import org.springframework.core.env.Environment;

/**
 * SHUN-GATEWAY 网关框架
 *
 * @author lushaonan
 * @since 2021-08-07
 */
@EnableDiscoveryClient
@Slf4j
@SpringBootApplication
public class ShunGatewayApp {

    public static void main(String[] args) {
        log.info("SHUN-网关服务启动...");
        SpringApplication shunGatewayApp = new SpringApplication(ShunGatewayApp.class);
        shunGatewayApp.setBannerMode(Banner.Mode.OFF);
        ApplicationContext context = shunGatewayApp.run(args);
        Environment env = context.getEnvironment();
        log.info("SHUN-网关服务启动成功.",env.getProperty("server.port"));
    }
}
